/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package us.icitap.cm.business.entities.regmin;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author klau
 */
@Entity
@Table(name = "REGION")
public class Region implements Serializable {


    /**
	 * 
	 */
	private static final long serialVersionUID = 2098554753245946472L;
	@Id
    @Column(name = "CODE_REGION", nullable = false)
    private String codeRegion;
    @Column(name = "TAG")
    private String tag;


    public Region() {
    }

    public Region(String codeRegion) {
        this.codeRegion = codeRegion;
    }

    public String getCodeRegion() {
        return codeRegion;
    }

    public void setCodeRegion(String codeRegion) {
        this.codeRegion = codeRegion;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

  

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codeRegion != null ? codeRegion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Region)) {
            return false;
        }
        Region other = (Region) object;
        if ((this.codeRegion == null && other.codeRegion != null) || (this.codeRegion != null && !this.codeRegion.equals(other.codeRegion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return this.getTag();
    }

}
